package com.xinsoft.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xinsoft.common.ApprovedParam;
import com.xinsoft.common.Response;
import com.xinsoft.entity.dto.*;
import com.xinsoft.entity.po.ScmSale;
import com.xinsoft.entity.vo.ScmSaleListVo;
import com.xinsoft.entity.vo.ScmSalePriceVo;
import com.xinsoft.entity.vo.ScmSaleVo;

import java.util.List;

/**
 * @author ZYM
 * @description 针对表【scm_sale(销售订单)】的数据库操作Service
 * @createDate 2023-07-04 14:59:06
 */
public interface ScmSaleService extends IService<ScmSale> {

    IPage<ScmSaleListVo> findPageListByParam(ScmSalePageParam param);

    List<ScmSaleListVo> findListByParam(ScmSalePageParam param);

    Integer tempSave(ScmSaleDTO scmSaleDTO);

    void del(List<Integer> ids);

    ScmSaleVo detail(Integer id);

    void close(List<Integer> ids);

    void reverseClose(List<Integer> ids);

    void lineClose(ScmSaleItemDTO scmSaleItemDTO);

    ScmSalePriceVo historyPrice(Integer clientId, Integer materialId);

    /**
     * 查询销售订单列表
     * @param idList 源单ids(销售订单ids)
     * @param materialIdList 物料ids
     * @param citeType 引用类型：发货通知引用0  销售出库引用1  采购计划引用2
     * @return {@link List}<{@link ScmSaleListVo}>
     */
    List<ScmSaleListVo> findList(List<Integer> idList, List<Integer> materialIdList,Integer citeType);
}
